package reflect;

import reflect.annotations.AutoRunClass;

import java.io.File;
import java.net.URISyntaxException;
import java.util.Arrays;

public class Test4 {
    public static void main(String[] args) throws Exception {
       /* File file = new File(
                Test4.class.getResource(".").toURI()
        );
        String packageName = Test4.class.getPackage().getName();
        String[] strings = file.listFiles();
        System.out.println(Arrays.toString(strings));
        for (String string:strings
             ) {
            String[] str = string.split("\\.");
            Class cls = Class.forName(packageName+"."+str[0]);
            boolean tf = cls.isAnnotationPresent(AutoRunClass.class);
            *//*if (cls.isAnnotationPresent(AutoRunClass.class)){
                System.out.println(str[0]+"被标注了");
                System.out.print("true");
            }else {
                System.out.println(str[0]+"未被标注");
                System.out.print("false");
            }*//*
            System.out.println(str[0]+(tf?":被标注了":"未被标注"));

        }*/
    }
}
